<template>
    <div style="text-align: center">
      <el-dialog :title="title" :visible.sync="visible" :append-to-body="true" @close="close()" style="text-align: center">
        <img :src="url"/>
        <div style="text-align: center">
          <el-button  type="primary" size="small" @click="close()">关闭</el-button>
        </div>
      </el-dialog>
    </div>
</template>

<script>
    import { getToken } from '@/utils/auth'
    export default {
        name: "viewFlow",
        data () {
            return {
                visible: false,
                url:'/api/flow/v1/flowImage/',
                title:'当前任务状态流程图'
            }
        },
        methods:{
            init(id,name){
                this.visible=true;
                this.url=this.url+id+"?authorization=Bearer " + getToken();
            },
            close(){
                this.visible=false
                this.$emit('viewFlowColse')
            }
        }
    }
</script>

<style scoped>

</style>
